package strategy1;

import java.util.Date;
//上下文
public class TaskContext {

    private String patientId;
    private Date purchaseDate;
    private Integer medicationDays;

    // 构造函数
    public TaskContext(String patientId, Date purchaseDate) {
        this.patientId = patientId;
        this.purchaseDate = purchaseDate;
    }

    public TaskContext(String patientId, Date purchaseDate, Integer medicationDays) {
        this(patientId, purchaseDate);
        this.medicationDays = medicationDays;
    }

    // getter方法
    public String getPatientId() { return patientId; }
    public Date getPurchaseDate() { return purchaseDate; }
    public Integer getMedicationDays() { return medicationDays; }
}
